//
//  DBLocalWork.h
//  KidReading
//
//  Created by telen on 15/7/22.
//  Copyright (c) 2015年 刘赞黄Telen. All rights reserved.
//

#import "DBHelper.h"
#import "DBHelper+Reader.h"
#import "DBHelper+Reading.h"

@interface DBHelper (DBLocalWork)

- (void)showTokenOutMsg:(NSString*)msg;

- (void)selectReadingCountList:(void (^)(NSDictionary* dict))complete;
- (LongLong)selectReadingCount_forBookId:(NSInteger)bookId db:(JRFMDatabase*)db;


- (void)selectBookList_Books:(NSString *)bookIds complete:(void (^)(NSDictionary *reDict))complete;
- (void)selectBookList_Books:(NSString *)bookIds limit:(long)lt complete:(void (^)(NSDictionary *))complete;
- (NSDictionary*)selectBookList_Books:(NSString *)bookIds db:(JRFMDatabase*)db;
//
- (void)selectBookWithReadCountList_Books:(NSString *)bookIds complete:(void (^)(NSDictionary *reDict))complete;

- (void)selectNotice:(void (^)(NSDictionary* reDict))complete;
- (void)selectQuiz_Books:(NSString *)bookIds complete:(void (^)(NSDictionary *reDict))complete;
- (void)selectSupportFiles:(void (^)(NSDictionary* reDict))complete;

//
//book排序
- (void)tbbooks_mutableArray:(NSMutableArray*)mArr orderBy_BookIds:(NSString*)bookids;


//阅读记录
- (void)addNew_Reading_Recored:(TABLE_READ_RECORD*)tb_rrd;
- (void)update_TheReading_Recored:(TABLE_READ_RECORD*)tb_rrd;
//
//字典模板阅读记录
- (void)addReadingRecored:(NSString*)key dict:(NSDictionary*)dict;

//Talk
- (void)selectTalk_Books:(NSString *)bookIds complete:(void (^)(NSDictionary *reDict))complete;

//TalkVedio
- (void)selectTalkVedioes:(NSString*)vedioIds complete:(void (^)(NSDictionary *reDict))complete;

//TalkInterview Save
- (void)addNew_TalkUploadedInfo:(TABLE_TALK_SAVE_INFO*)tb_tksave;


@end
